/*
 * @Author: zhaoxm
 * @Date: 2022-02-22 13:44:39
 * @LastEditTime: 2022-04-15 00:06:18
 * @Description: 自动注册为全局组件
 */
const modules = import.meta.glob("./*/index.vue")

export default {
  install(Vue) {
    for (const path of Object.keys(modules)) {
      if (path.includes("app") || path.includes("o-")) {
        const componentName = path.split("/")[1]
        Vue.component(componentName, modules[path])
      }
    }
  },
}
